<template>
  <div class="home">
    home
    <!-- <router-link to="/detail"><button>跳转到detail</button></router-link> -->
    <button @click="handleClick">跳转到detail</button>
    <button @click="handleMovieDet">跳转到movieDetail</button>
  </div>
</template>

<script>
export default {
  name: "Home",
  data() {
    return {};
  },
  methods: {
    handleClick() {
      var id = 1001;
      this.$router.push(`/detail?id=${id}`);
    },
    handleMovieDet() {
      var id = 1002;
      this.$router.push(`/movieDetail/${id}`);
    },
  },
};
</script>
